package com.kjtpay.design_pattern.composite;

class FinanceDepartment extends Company {
    public FinanceDepartment(String name) {
        super(name);
    }

    @Override
    public void add(Company company) {
        // 叶子节点; 什么也不做
    }

    @Override
    public void remove(Company company) {
        // 叶子节点; 什么也不做
    }

    @Override
    public String display(int depth) {
        String message = new String();
        for (int i = 0; i < depth; i++) {
            message += "-";
        }
        message += name;
        message += "\n";
        return message;
    }

    @Override
    public String lineOfDuty() {
        return name + "======" + "公司财务收支管理" + "\n";
    }
}
